<?php
date_default_timezone_set('Asia/Ho_Chi_Minh');
define('DS',DIRECTORY_SEPARATOR);
// change the following paths if necessary
$root 	= 	dirname(dirname(__FILE__));
//$yii	=	$root.'/common/libs/framework/yii.php';
$yii	=	'E:\source\framework\yii.php';
require_once($yii);

$base	=	require($root.'/common/config/main.php');
$backend=	require($root.'/backend/protected/config/backend.php');
$params	=	require($root.'/backend/protected/config/params.php');
$debug	=	require($root.'/common/config/debug.php');

if(isset($_GET['mode']) && $_GET['mode']=='dev'){
	defined('YII_DEBUG') or define('YII_DEBUG',true);
	defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL',3);
	$config	=	CMap::mergeArray($base, $backend, $params, $debug);
}else{
	defined('YII_DEBUG') or define('YII_DEBUG',false);
	$config	=	CMap::mergeArray($base, $backend, $params);
}
Yii::createWebApplication($config)->run();
